In recent years, scientific computation has been put to practical use, and simulations using complicated structures that exist in the real world are now performed. In such a simulation, a complicated structure in the real world is expressed within a computer by a form of structured data that employs pointers. As a pointer in structured data, either an absolute address or a relative address is employed, and either type of address has advantages and disadvantages.
Japanese Patent Application Publication No. 63-89948 (referred to as Patent Literature 1) discloses a data processing apparatus that has two units that solve problems resulting from the use of absolute addresses and the use of relative addresses. A first unit of the data processing apparatus is the unit configured to represent a pointer in the structured data by a relative address, and convert the relative address into an absolute address. A second unit of the data processing apparatus is the unit configured to represent a pointer in the structured data by an absolute address, and add or subtract a displacement in address to or from the values of all the pointers when the structured data is copied.
According to Patent Literature 1, such relative addresses that the beginning of the structured data is an origin are used as pointers, so that there is no need to rewrite the pointers when the entire structured data is moved or copied. Furthermore, the pointers of relative addresses can be converted into the pointers of absolute addresses by adding the beginning address of the structured data in response to the kind of a tag that each element (word) of the structured data contains. As a result, the overhead in address conversion can be reduced so that the high-speed processing of the structured data that includes pointers becomes possible.
In the ordinary processing of structured data, such a problem occurs, when structured data that employs pointers of absolute addresses is moved or copied, that it is necessary to copy one element at a time while tracing the entire original structure in accordance with the pointers, which requires a considerable amount of processing time.
In the ordinary processing of structured data, it is hard to immediately determine whether each word is a pointer or a value. Therefore, it is necessary, while the structured data is being traced, to determine whether the word is a pointer or a value, and to perform such an operation as to add the difference from the beginning address if the word is a pointer, and as not to add the difference if the word is a value. It takes several ten times of the processing time required when a certain area is moved or copied as a block.
Furthermore, in the data processing apparatus described in the foregoing Patent Literature 1, such a problem occurs that it is necessary to know the beginning address of structured data and to be uniquely determined beforehand. A reason for this is that ordinary structured data has a very complicated structure and it is difficult to immediately determine the beginning address of structure. For example, when pointers are employed among a plurality of structural bodies, the beginning addresses of a plurality of the structural bodies are sometimes needed at the time of processing structured data. In that case, such a problem occurs according to the method of Patent Literature 1 that there is a shortage of the register area.
Further, such a problem occurs according to the method disclosed by the foregoing Patent Literature 1 that the structured data moved or copied in an ordinary computer is hard to be traced at high speed. A reason for this is that the data of each word is identified whether the data is a pointer by the kind of the tag in Patent Literature 1, and pointers of absolute addresses obtained by adding the beginning address of structure are used to refer to elements of the structure, but ordinary computers do not have such tags.